<div class="col-md-12 mt20">
  <div class="panel panel-default">
    <div class="panel-body">
      <div class="col-md-3">
        <input type="text" class="form-control" placeholder="广告标题" ng-model="searchform.title">
      </div>
      <div class="col-md-2">
        <ui-select ng-model="searchform.is_show" theme="bootstrap">
          <ui-select-match placeholder="选择...">{{$select.selected.label}}</ui-select-match>
          <ui-select-choices repeat="item.code as item in searchform.show_list">
            <span ng-bind-html="item.label"></span>
          </ui-select-choices>
        </ui-select>
      </div>
      <div class="col-md-2 pull-right">
        <button class="btn btn-success search btn-block" ng-click="update(null)">创建广告</button>
      </div>
      <div class="col-md-2 pull-right">
        <button class="btn btn-info search btn-block" ng-click="loadlist()">立即搜索</button>
      </div>
    </div>

    <div class="panel-body">
      <table class="table table-striped table-bordered dataTable">
        <thead>
          <tr>
            <th class="col-md-3 text-center">广告标题</th>
            <th class="col-md-3 text-center">跳转链接</th>
            <th class="col-md-2 text-center">发布状态</th>
            <th class="col-md-2 text-center">创建时间</th>
            <th class="col-md-2 text-center">操作</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="bean in beanList">
            <td>{{bean.title}}</td>
            <td>{{bean.href}}</td>
            <td class="text-center">{{bean.is_show=='1'?'已发布':'未发布'}}</td>
            <td class="text-center">{{bean.create_time}}</td>
            <td class="text-center">
              <button type="button" ng-show="bean.is_show=='0'" class="btn btn-primary btn-xs" ng-click="setAD(bean,'1')">发布</button>
              <button type="button" ng-show="bean.is_show=='1'" class="btn btn-danger btn-xs" ng-click="setAD(bean,'0')">撤销</button>
              <button type="button" class="btn btn-success btn-xs" ng-click="update(bean)">修改</button>
              <button type="button" class="btn btn-danger btn-xs" ng-click="delete(bean,$index)">删除</button>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <!-- <div class="text-right" style="background-color: white; margin-right: 30px">
      <pagination total-items="totalItems" ng-model="currentPage" ng-change="load()" previous-text="上一页" 
      next-text="下一页" first-text="首页" last-text="尾页" max-size="5" boundary-links="true" 
      rotate="false" items-per-page="itemsPerPage" class="m-t-none m-b"></pagination>
    </div> -->
  </div>
</div>